package com.suanfa.sort;

/**
 * Created by buguniao on 16/2/21.
 */
public class Test {
    public static void main(String[] args) throws Exception{
        /*int n=100;
        StdDraw.setXscale(0,n);
        StdDraw.setYscale(0,n*n);
        StdDraw.setPenRadius(0.01);
        for(int i=1;i<=n;i++){
            StdDraw.point(i,i);
            StdDraw.point(i,i*i);
            StdDraw.point(i,i*Math.log(i));
        }*/
        StdDraw.setCanvasSize(1200,600);
        int n=200;
        double[] a=new double[n];
        for(int i=0;i<n;i++){
            a[i]=StdRandom.random();
        }
        for(int i=0;i<n;i++){
            double x= 1.0*i/n;
            double y=a[i]/2.0;
            double rw=0.4/n;
            double rh=a[i]/2.0;
            StdDraw.filledRectangle(x,y,rw,rh);
        }
    }
}
